﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class Ajax_UpdateAddress : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

        HttpContext c = HttpContext.Current;
        string rtn = "fail";
        Model.CMember cmodle = BLL.CMember.UserLoginInfo();
        string txtRealName = ReadRequest.RequestHtmlEnCode("txtRealName");
        string txtAddress = ReadRequest.RequestHtmlEnCode("txtAddress");
        string txtPost = ReadRequest.RequestHtmlEnCode("txtPost");
        string txtmobile = ReadRequest.RequestHtmlEnCode("txtmobile");

        if (cmodle != null)
        {
            cmodle.realname = txtRealName;
            cmodle.zaddress = txtAddress;
            cmodle.u_position = txtPost;
            cmodle.realb = txtmobile;
            if (BLL.CMember.Update(cmodle) > 0)
            {
                rtn = "sucess";
            }
            else
            {
                rtn = "请重新输入！";
            }
        }
        else
        {
            rtn = "请重新登陆！";
        }

        Response.Write(rtn);
        Response.End();
    }
}